﻿import flash.events.Event;
import flash.events.MouseEvent;
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;

public var username:String;
public var remotekey:String;

public static const ON_AUTHORIZE:String = "onAuthorize";

private function creationCompleteHandler(e:Event):void
{
	this.usrInput.text = username;
	this.pwdInput.text = remotekey;
}

private function onAuthorizeClick(e:Event):void
{
	this.username = this.usrInput.text;
	this.remotekey = this.pwdInput.text;
	this.dispatchEvent(new Event(ON_AUTHORIZE));
	close();
}

public function close():void
{
	PopUpManager.removePopUp(this);	
}